from django.test import TestCase

import requests

resp = requests.get('http://sohu.com/index.html')
print(resp.text)

resp = requests.get('https://www.baidu.com/img/pc_cc75653cd975aea6d4ba1f59b3697455.png')
with open('baidu.png', 'wb') as file:
    file.write(resp.content)
